linters:
  disable-all: true
  enable:
    - govet
    - gocritic
    - gocyclo
    - nakedret
    - gosimple
    - goconst
    - unconvert
    - ineffassign
    - staticcheck
    - unused
    - exportloopref

linters-settings:
  dupl:
    threshold: 100
  funlen:
    lines: -1
    statements: 50
  goconst:
    min-len: 2
    min-occurrences: 3
  gocritic:
    enabled-tags:
      - diagnostic
      - performance
      - style
    disabled-checks:
      - dupImport
      - ifElseChain
      - octalLiteral
      - whyNoLint
  gocyclo:
    min-complexity: 15
  gofmt:
    rewrite-rules:
      - pattern: 'interface{}'
        replacement: 'any'
  errorlint:
    asserts: false
  lll:
    line-length: 140
  revive:
    rules:
      - name: unexported-return
        disabled: true
      - name: unused-parameter

issues:
  exclude-rules:
    - text: "shadow: declaration of \"(err|ctx)\" shadows declaration at"
      linters: [govet]

    - text: "nknown JSON option \"flow\""
      linters: [staticcheck]

    - text: "string `(enabled|true)` has"
      linters: [goconst]

    - path: (.+)_test\.go
      linters:
        - dupl
        - gomnd
        - lll

run:
  timeout: 5m